/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package aqu.persistencia.entity;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Verito Ramirez
 *         Victor Jaramillo
 */
@Entity
@Table(name = "cxp_estadonota")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "CxpEstadoNota.findAll", query = "SELECT s FROM CxpEstadoNota s"),
    @NamedQuery(name = "CxpEstadoNota.findBycxpCodigoEstNot", query = "SELECT s FROM CxpEstadoNota s WHERE s.cxpCodigoEstNot = :cxpCodigoEstNot"),
    @NamedQuery(name = "CxpEstadoNota.findBycxpNombreEstNot", query = "SELECT s FROM CxpEstadoNota s WHERE s.cxpNombreEstNot = :cxpNombreEstNot")})
public class CxpEstadoNota implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @NotNull
    @Size(min = 1, max = 10)
    @Column(name = "CXP_CODIGO_ESTNOT")
    private String cxpCodigoEstNot;
    @Size(max = 30)
    @Column(name = "CXP_NOMBRE_ESTNOT")
    private String cxpNombreEstNot;
    
    
    public CxpEstadoNota() {
    }
    
    public CxpEstadoNota(String cxpCodigoEstNot) {
        this.cxpCodigoEstNot = cxpCodigoEstNot;
    }

    public CxpEstadoNota(String cxpCodigoEstNot, String cxpNombreEstNot) {
        this.cxpCodigoEstNot = cxpCodigoEstNot;
        this.cxpNombreEstNot = cxpNombreEstNot;
    }

    public String getCxpCodigoEstNot() {
        return cxpCodigoEstNot;
    }

    public void setCxpCodigoEstNot(String cxpCodigoEstNot) {
        this.cxpCodigoEstNot = cxpCodigoEstNot;
    }

    public String getCxpNombreEstNot() {
        return cxpNombreEstNot;
    }

    public void setCxpNombreEstNot(String cxpNombreEstNot) {
        this.cxpNombreEstNot = cxpNombreEstNot;
    }

    

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (cxpCodigoEstNot != null ? cxpCodigoEstNot.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof CxpEstadoNota)) {
            return false;
        }
        CxpEstadoNota other = (CxpEstadoNota) object;
        if ((this.cxpCodigoEstNot == null && other.cxpCodigoEstNot != null) || (this.cxpCodigoEstNot != null && !this.cxpCodigoEstNot.equals(other.cxpCodigoEstNot))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "clases.CxpEstadoNota[ cxpCodigoEstNot=" + cxpCodigoEstNot + " ]";
    }
    
}
